<!--
 * @Author: coman
 * @LastEditors: coman
 * @Date: 2020-06-11 17:43:06
 * @motto: No pain,No gain
 * @LastEditTime: 2020-06-11 17:57:52
--> 
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <!-- - 编写一个函数，计算三个数字的大小，按从小到大顺序输出 -->
    <script>
        // 冒泡排序
        function sort(){
            for(var i=0;i<arguments.length;i++){
                for(var j=0;j<arguments.length-i;j++){
                   if(arguments[j]>arguments[j+1]){
                       var temp = arguments[j];
                       arguments[j]=arguments[j+1];
                       arguments[j+1]=temp;
                   }

                }
            }
            return arguments;
        }
        console.log(sort(5,3,7,3,9));
        
    </script>
</body>
</html>